import { message } from 'antd'
import React, { Component } from 'react'
import { get } from '../../axios/localstorage'
import './htitle.scss'
import {  withRouter } from 'react-router-dom'

class htitle extends Component {


    gotoUser=()=>{

        if(!get('token')){
            message.info("请先登录！");
            return false;
        }

        this.props.history.push('/usercenter');
    }

    render() {
        return (
            <div className="hhtitle">
                <div className="hspan">继续教育答题测试系统</div>
                <div className="h_user" onClick={()=>{this.gotoUser()}}>
                    <div className="cen">
                        <img alt="" src="assets/imgs/gerenzhongxin.png" />
                    </div>
                    <p>个人中心</p>
                </div>

                <img alt="" src="assets/imgs/jiiqren.png" className="hello" />
            </div>
        )
    }
}

export default withRouter(htitle);